home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / mflzt.exe / lha / MSPORT.H < prev    next >
C/C++ Source or Header  |  1989-11-15  |  2KB  |  41 lines

  1. /************************************************************************/
  2. /*                                                                      */
  3. /*  MSPORT Header file                                                  */
  4. /*                                                                      */
  5. /*  Function wrappers for portability from MSC.                         */
  6. /*                                                                      */
  7. /*  Copyright 1989 by Robert B. Stout dba MicroFirm                     */
  8. /*  All rights reserved                                                 */
  9. /*                                                                      */
  10. /*  Copyright 1986, 1987 by S.E. Margison                               */
  11. /*                                                                      */
  12. /*  Compiled by and for use with Zortech C/C++ 1.07 or later.           */
  13. /*                                                                      */
  14. /************************************************************************/
  15.  
  16. #ifndef MSPORT_H
  17. #define MSPORT_H
  18.  
  19. #define find_t FIND
  20.  
  21. #define _dos_findfirst(path,attrib,ffblk) (NULL==rfind_1st(path,attrib,ffblk))
  22. #define _dos_findnext(ffblk)              (NULL==rfind_nxt(ffblk,RF_KEEP))
  23.  
  24. #define _A_ARCH    FA_ARCH
  25. #define _A_VOLID   FA_LABEL
  26. #define _A_SUBDIR  FA_DIREC
  27. #define _A_SYSTEM  FA_SYSTEM
  28. #define _A_RDONLY  FA_RDONLY
  29. #define _A_HIDDEN  FA_HIDDEN
  30.  
  31. #if __ZTC__ < 0x108
  32.  #define _dos_setdrive(d,x) {int r; r = chdrv(d + '@'); *x = r ? 0 : d;}
  33.  #define _dos_getdrive(x) {char drv; drv = getdrv(); *x = (int)(drv - '@');}
  34.  #define _dos_setfileattr(n,a) (flsetatr(n, a))
  35.  #define _dos_getfileattr(n,p) {int a; a = flgetatr(n); *p = a;}
  36.  #define _splitpath(x,d,p,n,e) (fnsplit(x, d, NULL, p, NULL, n, e))
  37.  #define _makepath(x,d,p,n,e) (fnmerge(x, d, NULL, p, NULL, n, e))
  38. #endif
  39.  
  40. #endif /* MSPORT_H */
  41.